﻿#pragma once
#include<string>
#include<deque>
#include"ObjectList.h"
using namespace std;

class Poultry{
public:
	ObjectList objectList; //Danh sach doi tuong duoc sinh ra (trung,chat thai)
	float t0 ;//Khoi tao thoi gian sinh san
 	float x,y,vx;//Toa do diem (x,y) va van toc vx
	bool flag;//Kiem tra di chuyen ve sau hay truoc
	string	strNameClass;//Bien gan ten  gia cam cu the
	Poultry(): x(-WIDTH/2+41), y(HEIGHT/2-44),vx(1),flag(false),t0(float(glutGet(GLUT_ELAPSED_TIME))){}
	//Timer cho gia cam (di chuyen)
	void timer(){
		if((x+vx)>(WIDTH / 2-41)) flag  = false;
		else if((x+vx)<(-WIDTH / 2+41)) flag = true;
		if(flag) x+=vx;
		else x-=vx;
	}
};

